# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: schuay <jakob.gruber@gmail.com>
# Contributor: Gabriel B. Casella <gbc921@gmail.com>
# Contributor: josephgbr <rafael.f.f1@gmail.com>

pkgname=pdfgrep
pkgver=2.1.2
pkgrel=3
pkgdesc='A tool to search text in PDF files'
arch=(loong64 x86_64)
url='https://pdfgrep.org'
# url='https://gitlab.com/pdfgrep/pdfgrep'
license=(GPL)
depends=(pcre
         poppler)
_archive="$pkgname-$pkgver"
source=("$url/download/$_archive.tar.gz")
sha256sums=('0ef3dca1d749323f08112ffe68e6f4eb7bc25f56f90a2e933db477261b082aba')

build() {
	cd "$_archive"
	./configure --prefix=/usr
	make
}

check() {
	cd "$_archive"
	make -k check
}

package() {
	cd "$_archive"
	make DESTDIR="$pkgdir/" install
}
